package com.zf.yichat.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

public class User implements Serializable {

    // 用户状态有效
    public static final Integer STATUS_0 = 0;
    // 用户状态失效
    public static final Integer STATUS_1 = 1;
    // 用户状态注销
    public static final Integer STATUS_2 = 2;

    // 普通用户
    public static final  Integer LEVEL_GENERAL = 0;
    // 初级合伙人用户
    public static final  Integer LEVEL_MEMBER = 1;
    // 中级合伙人用户
    public static final  Integer LEVEL_MEMBER_INTERMEDIATE = 4;
    // 高级合伙人用户
    public static final  Integer LEVEL_SUPREME_MEMBER = 2;
    // 终级合伙人用户
    public static final  Integer LEVEL_ULTIMATE_MEMBER = 3;

    // 注册类型
    public static final String REGISTER_TYPE = "register";
    // 实名认证类型
    public static final String REAL_NAME_TYPE = "realName";
    // 绑卡类型
    public static final String BIND_CARD_TYPE = "bindCard";


    @Id
    private Long id;

    /**
     * 昵称
     */
    private String nick;

    /**
     * 区号  前缀
     */
    @Column(name = "area_code")
    private String areaCode;

    /**
     * 手机号
     */
    private String mobile;

    private String password;

    private String salt;

    /**
     * 加密后token
     */
    private String token;

    /**
     * 头像路径
     */
    private String avatar;

    /**
     * 用户注册平台  iOs  android
     */
    private String platform;

    /**
     * 0正常 1删除/冻结
     */
    private Integer status;

    /**
     * 微信ID
     */
    @Column(name = "appId")
    private String appid;

    /**
     * 0 女 1男
     */
    private Integer gender;

    /**
     * 唯一码
     */
    private String ucode;

    /**
     * 父级唯一码
     */
    @Column(name = "recommend_code")
    private String recommendCode;

    private Long timestamp;

    /**
     * 最近登录时间
     */
    @Column(name = "login_time")
    private Date loginTime;

    /**
     * 0无权限  1有权限  是否有建群权限
     */
    @Column(name = "create_group_auth")
    private Integer createGroupAuth;

    /**
     * 二维码ID
     */
    private String qrcode;

    /**
     * 真实姓名
     */
    @Column(name = "real_name")
    private String realName;

    /**
     * 身份证号
     */
    @Column(name = "id_number")
    private String idNumber;

    /**
     * 0未认证 1认证
     */
    @Column(name = "real_status")
    private Integer realStatus;

    /**
     * 身份证正反面照片，逗号分隔
     */
    @Column(name = "id_imgs")
    private String idImgs;

    /**
     * 支付宝账号
     */
    @Column(name = "alipay_account")
    private String alipayAccount;

    /**
     * 积分
     */
    private Integer integral;

    private Date ctime;

    private Date utime;

    /**
     * 淘宝客渠道ID
     */
    @Column(name = "relation_id")
    private Long relationId;

    /**
     * 淘宝客会员运营ID
     */
    @Column(name = "special_id")
    private Long specialId;

    @Column(name = "xspayUserId")
    private String xspayuserid;

    @Column(name = "xspayBankId")
    private Integer xspaybankid;

    // 0 普通 1 会员
    private Integer level;

    @Column(name = "remark")
    private String remark;

    private static final long serialVersionUID = 1L;

    public User(Long id, String nick, String areaCode, String mobile,
                String password, String salt, String token, String avatar,
                String platform, Integer status, String appid, Integer gender,
                String ucode, String recommendCode, Long timestamp, Date loginTime,
                Integer createGroupAuth, String qrcode, String realName, String idNumber,
                Integer realStatus, String idImgs, String alipayAccount, Integer integral,
                Date ctime, Date utime, Long relationId, Long specialId, String xspayuserid,
                Integer xspaybankid, Integer level, String remark) {
        this.id = id;
        this.nick = nick;
        this.areaCode = areaCode;
        this.mobile = mobile;
        this.password = password;
        this.salt = salt;
        this.token = token;
        this.avatar = avatar;
        this.platform = platform;
        this.status = status;
        this.appid = appid;
        this.gender = gender;
        this.ucode = ucode;
        this.recommendCode = recommendCode;
        this.timestamp = timestamp;
        this.loginTime = loginTime;
        this.createGroupAuth = createGroupAuth;
        this.qrcode = qrcode;
        this.realName = realName;
        this.idNumber = idNumber;
        this.realStatus = realStatus;
        this.idImgs = idImgs;
        this.alipayAccount = alipayAccount;
        this.integral = integral;
        this.ctime = ctime;
        this.utime = utime;
        this.relationId = relationId;
        this.specialId = specialId;
        this.xspayuserid = xspayuserid;
        this.xspaybankid = xspaybankid;
        this.level = level;
        this.remark = remark;
    }


    public User() {
        super();
    }

    /**
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取昵称
     *
     * @return nick - 昵称
     */
    public String getNick() {
        return nick;
    }

    /**
     * 设置昵称
     *
     * @param nick 昵称
     */
    public void setNick(String nick) {
        this.nick = nick == null ? null : nick.trim();
    }

    /**
     * 获取区号  前缀
     *
     * @return area_code - 区号  前缀
     */
    public String getAreaCode() {
        return areaCode;
    }

    /**
     * 设置区号  前缀
     *
     * @param areaCode 区号  前缀
     */
    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode == null ? null : areaCode.trim();
    }

    /**
     * 获取手机号
     *
     * @return mobile - 手机号
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * 设置手机号
     *
     * @param mobile 手机号
     */
    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    /**
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password
     */
    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    /**
     * @return salt
     */
    public String getSalt() {
        return salt;
    }

    /**
     * @param salt
     */
    public void setSalt(String salt) {
        this.salt = salt == null ? null : salt.trim();
    }

    /**
     * 获取加密后token
     *
     * @return token - 加密后token
     */
    public String getToken() {
        return token;
    }

    /**
     * 设置加密后token
     *
     * @param token 加密后token
     */
    public void setToken(String token) {
        this.token = token == null ? null : token.trim();
    }

    /**
     * 获取头像路径
     *
     * @return avatar - 头像路径
     */
    public String getAvatar() {
        return avatar;
    }

    /**
     * 设置头像路径
     *
     * @param avatar 头像路径
     */
    public void setAvatar(String avatar) {
        this.avatar = avatar == null ? null : avatar.trim();
    }

    /**
     * 获取用户注册平台  iOs  android
     *
     * @return platform - 用户注册平台  iOs  android
     */
    public String getPlatform() {
        return platform;
    }

    /**
     * 设置用户注册平台  iOs  android
     *
     * @param platform 用户注册平台  iOs  android
     */
    public void setPlatform(String platform) {
        this.platform = platform == null ? null : platform.trim();
    }

    /**
     * 获取0正常 1删除/冻结
     *
     * @return status - 0正常 1删除/冻结
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置0正常 1删除/冻结
     *
     * @param status 0正常 1删除/冻结
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取微信ID
     *
     * @return appId - 微信ID
     */
    public String getAppid() {
        return appid;
    }

    /**
     * 设置微信ID
     *
     * @param appid 微信ID
     */
    public void setAppid(String appid) {
        this.appid = appid == null ? null : appid.trim();
    }

    /**
     * 获取0 女 1男
     *
     * @return gender - 0 女 1男
     */
    public Integer getGender() {
        return gender;
    }

    /**
     * 设置0 女 1男
     *
     * @param gender 0 女 1男
     */
    public void setGender(Integer gender) {
        this.gender = gender;
    }

    /**
     * 获取唯一码
     *
     * @return ucode - 唯一码
     */
    public String getUcode() {
        return ucode;
    }

    /**
     * 设置唯一码
     *
     * @param ucode 唯一码
     */
    public void setUcode(String ucode) {
        this.ucode = ucode == null ? null : ucode.trim();
    }

    /**
     * 获取父级唯一码
     *
     * @return recommend_code - 父级唯一码
     */
    public String getRecommendCode() {
        return recommendCode;
    }

    /**
     * 设置父级唯一码
     *
     * @param recommendCode 父级唯一码
     */
    public void setRecommendCode(String recommendCode) {
        this.recommendCode = recommendCode == null ? null : recommendCode.trim();
    }

    /**
     * @return timestamp
     */
    public Long getTimestamp() {
        return timestamp;
    }

    /**
     * @param timestamp
     */
    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    /**
     * 获取最近登录时间
     *
     * @return login_time - 最近登录时间
     */
    public Date getLoginTime() {
        return loginTime;
    }

    /**
     * 设置最近登录时间
     *
     * @param loginTime 最近登录时间
     */
    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    /**
     * 获取0无权限  1有权限  是否有建群权限
     *
     * @return create_group_auth - 0无权限  1有权限  是否有建群权限
     */
    public Integer getCreateGroupAuth() {
        return createGroupAuth;
    }

    /**
     * 设置0无权限  1有权限  是否有建群权限
     *
     * @param createGroupAuth 0无权限  1有权限  是否有建群权限
     */
    public void setCreateGroupAuth(Integer createGroupAuth) {
        this.createGroupAuth = createGroupAuth;
    }

    /**
     * 获取二维码ID
     *
     * @return qrcode - 二维码ID
     */
    public String getQrcode() {
        return qrcode;
    }

    /**
     * 设置二维码ID
     *
     * @param qrcode 二维码ID
     */
    public void setQrcode(String qrcode) {
        this.qrcode = qrcode == null ? null : qrcode.trim();
    }

    /**
     * 获取真实姓名
     *
     * @return real_name - 真实姓名
     */
    public String getRealName() {
        return realName;
    }

    /**
     * 设置真实姓名
     *
     * @param realName 真实姓名
     */
    public void setRealName(String realName) {
        this.realName = realName == null ? null : realName.trim();
    }

    /**
     * 获取身份证号
     *
     * @return id_number - 身份证号
     */
    public String getIdNumber() {
        return idNumber;
    }

    /**
     * 设置身份证号
     *
     * @param idNumber 身份证号
     */
    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber == null ? null : idNumber.trim();
    }

    /**
     * 获取0未认证 1认证
     *
     * @return real_status - 0未认证 1认证
     */
    public Integer getRealStatus() {
        return realStatus;
    }

    /**
     * 设置0未认证 1认证
     *
     * @param realStatus 0未认证 1认证
     */
    public void setRealStatus(Integer realStatus) {
        this.realStatus = realStatus;
    }

    /**
     * 获取身份证正反面照片，逗号分隔
     *
     * @return id_imgs - 身份证正反面照片，逗号分隔
     */
    public String getIdImgs() {
        return idImgs;
    }

    /**
     * 设置身份证正反面照片，逗号分隔
     *
     * @param idImgs 身份证正反面照片，逗号分隔
     */
    public void setIdImgs(String idImgs) {
        this.idImgs = idImgs == null ? null : idImgs.trim();
    }

    /**
     * 获取支付宝账号
     *
     * @return alipay_account - 支付宝账号
     */
    public String getAlipayAccount() {
        return alipayAccount;
    }

    /**
     * 设置支付宝账号
     *
     * @param alipayAccount 支付宝账号
     */
    public void setAlipayAccount(String alipayAccount) {
        this.alipayAccount = alipayAccount == null ? null : alipayAccount.trim();
    }

    /**
     * 获取积分
     *
     * @return integral - 积分
     */
    public Integer getIntegral() {
        return integral;
    }

    /**
     * 设置积分
     *
     * @param integral 积分
     */
    public void setIntegral(Integer integral) {
        this.integral = integral;
    }

    /**
     * @return ctime
     */
    public Date getCtime() {
        return ctime;
    }

    /**
     * @param ctime
     */
    public void setCtime(Date ctime) {
        this.ctime = ctime;
    }

    /**
     * @return utime
     */
    public Date getUtime() {
        return utime;
    }

    /**
     * @param utime
     */
    public void setUtime(Date utime) {
        this.utime = utime;
    }

    /**
     * 获取淘宝客渠道ID
     *
     * @return relation_id - 淘宝客渠道ID
     */
    public Long getRelationId() {
        return relationId;
    }

    /**
     * 设置淘宝客渠道ID
     *
     * @param relationId 淘宝客渠道ID
     */
    public void setRelationId(Long relationId) {
        this.relationId = relationId;
    }

    /**
     * 获取淘宝客会员运营ID
     *
     * @return special_id - 淘宝客会员运营ID
     */
    public Long getSpecialId() {
        return specialId;
    }

    /**
     * 设置淘宝客会员运营ID
     *
     * @param specialId 淘宝客会员运营ID
     */
    public void setSpecialId(Long specialId) {
        this.specialId = specialId;
    }

    /**
     * @return xspayUserId
     */
    public String getXspayuserid() {
        return xspayuserid;
    }

    /**
     * @param xspayuserid
     */
    public void setXspayuserid(String xspayuserid) {
        this.xspayuserid = xspayuserid == null ? null : xspayuserid.trim();
    }

    /**
     * @return xspayBankId
     */
    public Integer getXspaybankid() {
        return xspaybankid;
    }

    /**
     * @param xspaybankid
     */
    public void setXspaybankid(Integer xspaybankid) {
        this.xspaybankid = xspaybankid;
    }

    /**
     * @return level
     */
    public Integer getLevel() {
        return level;
    }

    /**
     * @param level
     */
    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}

